package com.rainbow.mybatis.executor;


import com.rainbow.mybatis.config.Configuration;

/**
 * Created by James on 2017-07-01.
 * From 咕泡学院出品
 * 老师咨询 QQ 2904270631
 */
public class ExecutorFactory {

    private static final String SIMPLE = "SIMPLE";
    private static final String CACHING = "CACHING";


    public static Executor DEFAULT(Configuration configuration) {
        return get(SIMPLE, configuration);
    }

    public static Executor get(String key, Configuration configuration) {
       return configuration.newExecutor(key,configuration);
    }

    public enum ExecutorType {
        SIMPLE,CACHING
    }
}
